package cn.edu.niit.alienlab.jshttplessonserver.service;

import cn.edu.niit.alienlab.jshttplessonserver.domain.DirectorInfo;
import cn.edu.niit.alienlab.jshttplessonserver.domain.MovieRatings;
import cn.edu.niit.alienlab.jshttplessonserver.domain.MovieInfo;
import cn.edu.niit.alienlab.jshttplessonserver.dto.CategoryDto;
import cn.edu.niit.alienlab.jshttplessonserver.dto.MovieInfoDto;
import cn.edu.niit.alienlab.jshttplessonserver.dto.YearDto;
import org.springframework.data.domain.Page;


import java.util.List;

public interface MovieService {
    List<CategoryDto> findAllCategory();

    List<YearDto> findAllYear();

    Page<MovieInfoDto> findMovie(String keyword, Integer movie_year, String[] categories, Integer pageNum, Integer pageSize);

    public List<MovieRatings> selectRatingsByMovieId(Integer movie_id);

    List<MovieInfo> findMovieByMovieID(Integer movie_id);

    List<DirectorInfo> getAllDirectors(String keyword);

    MovieInfo createMovie(MovieInfo movieInfo) throws Exception;
    MovieInfo updateMovie(MovieInfo movieInfo);

    boolean deleteMovie(Integer movieId);
}
